#include <iostream>
using namespace std;
// 代理模式
class RentHouse
{
public:
    virtual void rentHouse() = 0;
};
class Landlord : public RentHouse
{
public:
    void rentHouse()
    {
        cout << "租售房子" << endl;
    }
};

class Intermediary : public RentHouse
{
public:
    void rentHouse()
    {
        cout << "发布招租启示\n";
        cout << "带人看房\n";
        landlord.rentHouse();
        cout << "负者售后维修\n";
    }

private:
    Landlord landlord;
};
int main()
{
    Intermediary intermediary;
    intermediary.rentHouse();
    return 0;
}